package com.fh.shop.api.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fh.shop.api.product.po.Product;
import com.fh.shop.api.product.po.ProductItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IProductMapper extends BaseMapper<Product> {
    List<ProductItem> findListByStock(int stock);

    int updateStock(@Param("buyCount") Long count, @Param("productId") Long productId);

    void updateSale(@Param("productId") Long productId, @Param("count") Integer count);
}
